"""
if 选择语句
if ... elif...
if ... elif...elif...sequence
"""

def testIf():
    age = 12
    res = ""

    if age < 0:
        res = "illeagal age less than 0"
    elif age == 0:
        res = "0 year old"
    elif age < 9:
        res = "primary school"
    elif age < 12:
        res = "middle school"
    elif age < 18:
        res = "high school"
    else:
        res = "work age"

    print("age = {0}, res is {1}".format(age, res))

testIf()